#pragma once

#include "stdint.h"
#include "stdio.h"
#include "stdlib.h"

typedef void (*socket_inform_cb_t)(uint8_t *, uint16_t);
typedef void (*socket_up_cb_t)(uint8_t);
typedef void (*socket_down_cb_t)(uint8_t);
typedef struct rcs_socket_s
{
  int sock;
  socket_inform_cb_t inform_cb;
  socket_up_cb_t net_up_cb;
  socket_down_cb_t net_down_cb;
} rcs_socket_t;


void socket_init(socket_inform_cb_t _inform_cb, socket_up_cb_t _up_cb, socket_down_cb_t _down_cb);
void rcs_socket_send(uint8_t *package, size_t raw_len);


